<html>
<head><meta charset="utf-8"><title>excludeGlobs not working? · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/excludeGlobs.20not.20working.3F.html">excludeGlobs not working?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="176175289"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/excludeGlobs%20not%20working%3F/near/176175289" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Geobomatic <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/excludeGlobs.20not.20working.3F.html#176175289">(Sep 20 2019 at 08:47)</a>:</h4>
<p>Hi, working with bindgen at the moment, when opening <code>bindings.rs</code>, I have a bunch of error from RA:</p>
<div class="codehilite"><pre><span></span>[Error - 09:40:33] Request textDocument/hover failed.
  Message: Rust file outside current workspace is not supported yet.
  Code: -32600
</pre></div>


<p>Fair enough, it is located in <code>target/thumbv7em-none-aebi/my_crate-sys-hexnumber/out/</code>. So I want to exclude everything under <code>target</code>:</p>
<div class="codehilite"><pre><span></span><span class="s2">&quot;rust-analyzer.excludeGlobs&quot;</span><span class="err">:</span> <span class="p">[</span>
        <span class="s2">&quot;tests/**&quot;</span><span class="p">,</span>
        <span class="s2">&quot;lib/**&quot;</span><span class="p">,</span>
        <span class="err">&quot;target/**</span><span class="p">,</span>
    <span class="p">]</span><span class="err">,</span>
</pre></div>


<p>but it's still poping errors.</p>
<p>I've seen the note in the doc:</p>
<blockquote>
<p>Note: glob patterns are applied to all Cargo packages and a rooted at a package root. </p>
</blockquote>
<p>but I don't understand what it means</p>



<a name="176175369"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/excludeGlobs%20not%20working%3F/near/176175369" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/excludeGlobs.20not.20working.3F.html#176175369">(Sep 20 2019 at 08:49)</a>:</h4>
<p>I think you actually want to include the subdir of <code>target</code> in this case, but that's not supported yet</p>



<a name="176175934"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/excludeGlobs%20not%20working%3F/near/176175934" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Geobomatic <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/excludeGlobs.20not.20working.3F.html#176175934">(Sep 20 2019 at 08:57)</a>:</h4>
<p>I tried <code>"target/thumbv7em-none-eabi/debug/build/efr32mg12-sys-fa678db515a5a450/out/*"</code> but it's still poping errors</p>



<a name="176176166"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/excludeGlobs%20not%20working%3F/near/176176166" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/excludeGlobs.20not.20working.3F.html#176176166">(Sep 20 2019 at 09:01)</a>:</h4>
<p>yeah, there's no way to fix it without sending a patch to rust-analyzer unfortunatelly</p>



<a name="176176828"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/excludeGlobs%20not%20working%3F/near/176176828" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Geobomatic <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/excludeGlobs.20not.20working.3F.html#176176828">(Sep 20 2019 at 09:12)</a>:</h4>
<p>I see, I may have a look at this once the raw_string issue is complete <span aria-label="slight smile" class="emoji emoji-1f642" role="img" title="slight smile">:slight_smile:</span></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>